// 实现反转数组
type ReverseTuple<T extends unknown[], Result extends unknown[] = []> = 
    T extends [infer First, ...infer Rest]
        ? ReverseTuple<Rest, [First, ...Result]>
        : Result
type T = ['a', 'b', 1, number, never]
type T2 = ReverseTuple<T> // [never, number, 1, "b", "a"]

// 如何获取枚举类型的枚举的名字
enum E { A, B, C, D, E='abc', F=5, G='def'}
// 获取枚举成员名的类型
type EnumKeys<T> = {
    [K in keyof T]: K
}[keyof T];

type T3 = EnumKeys<typeof E> // "A" | "B" | "C" | "D" | "E" | "F" | "G"
